implemented everything

only commented left to do