Now using scoped enums and added setrange function