added more ajax functionality