made duplicated code more apperant