initial implementation of the build 2

stop and wait has not been implemented