mehtods with arguments done and also refectored to use contracts and moved trait to it's own directory