moved to constructor pattern