subtract flatmax from everything