CARD #149
https://trello.com/c/sGHgu3jr

added tests.