switched to ajax call and removed debug statements