refactred apply and unapply
updated tests
added transformer test