objectscope corrected, variables defined for function parameters, methods separated