fixed case statements and argument handling