fix function; remove unnecessary comments