added database_query

very messy, but works