tests for various functions