working something, messy code