working version, before removing plan page