Added working code! Yaay!