change code for better documentation