Added initial working code