trying to get the function to look right