refactored and added stuff for listing products