converted to cmake so CLion can be used