made major changes to backend