some simple codes