Simplify the code