created 3 javascript constructors