solution for first task