top modified to fit cache and exception