adding more procedures, writing some really weird looking code