refined structures
refined the source code using function prototype - more readable
final commit before function refactoring