changing how back works, refactored things