finish organizing code