move stack to seperate file