fixing basic code