unit testing functions (don't use it)