Added test func to lib