updated main cs file