implemented another select query