getting ready to pull and bin data from database