merge tested code to master