added funtional tests