refactored ajax form populate