Simplify code a little