implemented sql command queries