using  instead of console.log in controller