added masterPort param