sql and backend changes