changed constructor to expect an object