@AhmedOsam Add a documentation to this function