I think I need to rewrite it. Its messy