rewritten to lower case function and variable names