fixed bugs and added validation to home controller