Added function to help with testing

The function added converts task to string