changing test to function. cleaner that way.