added async to js input