Replaced ajax get with proper ajax request