optimizations : inlining functions , that are called very frequently