sorted some of the problems