refactor db_action to individal class