Initial code with comments