some pieces of code for referance