added nice way to get alert from API
removed unused array