adding ajax endpoint stuff