Version 1.0 working code