refactor
Add ajax call