added delay, js needs work