Update & test

new working code