accepts data on constructor