Reworked to be more flexible and descriptive