write module correctly