Finally working dirtiest code of my fucking life