working BUT not best solution

TODO: try to do AJAX for URL with promises instead of a callbak