changed var/function names to abide by naming conventions