changed the constructor