change functions to return array instead of enum