couldn't figure a way to reduce redundancy :(