made the js non blocking, like a boss