work on acks, reorder functions in file