fixed a few bugs. and a type and the menu works