worked on js constructors