changed sql and switched render to jade