Reverted back to working code

Code from (11/12)