shortened code a little bit more