added default behaviour to ajax