old and bugged code removed