stack not working but code is A LOT cleaner :D