Added error messages in controller for compare method - need to fix logic