initial code including example for reference