make fields and constructor public