refactored, changed compile option