extending js logic and created a plan modal