Simplify code a little bit