Solution for programming asignement 2