fixed some code aesthetics
fixed merge