reworked the entire things