simplifies still repetitive code