modified some stuff
solved first problem