refactored new frontend to work with new backend