changed key name to start with 'select' rather than row - also some general cleanup