Code added

First usable implementation