refactored js to not use crazy callback params