Magic number 50 here should be converted to a constant.