reworked to use enum for type