cleaned up for later static linking