#52 fixed, code reformat