changed to new constructor