code edited removed bugs