fixed tests not to use library function