added logic to home controller