added ws app in loop