Alexey

Pushed two commits:
1) with added tests
2) with changed formatting