planning stack implemenation