renamed some local variables to convention