W.I.P
Working version
* TODO: clean code