created functions and new class