moved to class, cleaner (shoudl be)