You can search online for inspiration on how to implement these two transformations.