working on registers and ast