code finally debugged. Show help function and user output will be implemented soon