initial pop logic works vertically - need to add horizontal