replaced show page reload with ajax