basic code written