conditional library, cleaned up syntax a bit more