[#32] updated the controller accroding to comments