adding pro javascript design patterns