Added render templates to the new functions . added a row for ajax call,changed id to start from 1