code and output