clearing up erroneous code