More working code.
Code for public!