do this a better way