rewritten how everything works