improed tests, few functions added