fixing the MVC logic -backend