added comments to prepend function