state instead of stackPos