Controller code working