changed some delay to setTimeout 3