hideous 3am code needs fixing... sorry