add ajax code for plans
adding some codes
adding some codes #2
fix a little error
adding some codes#3
fix filtering errors