Added working code back in