Made some programming magic