rudimentary unit testign for complex functions