getting attributes to pass in correctly