improved ef405 with javascript