added portable library
attempt to handle free arguments