example code for creating a windows service