added ajax function to post new positions