add construcor patter js file