added flush? function
first draft of straight? function, modified the main method