added run method to select from db