changes in controller for mapping values from db