All this looks really bad. Please refactor it