modified process_action to return a render response, fixed templates