refact code & some annotations