use enum to identify the type