updated version from Jameed