cleanded up port version