solution for lab
added tests