moved html into template and ajax call