removed last dirty code and added increment to prevent overwrite keys of stack