added enum and replaced some functions
added enum and read argument function, some functions replaced