solution for remaining tasks