code mostly completed
fixed