* This is some serious spagetthi code.. not nice :(