this code has been seriously cut as i do not wanna work on this bs anymore