cleanup code, errors gone