rewrote many methods to make them shorter and easier to understand I mean