initial work on stack positioning (incomplete)