using a function to handle a little more