formartting homecontroller code