added more functions for database searching