getting from database working