some code from course projects