getting close to engine but still have bug in .pop method