merge with the fixed code