added a nice macro, made code more readable