fixed while
fixed functions1