updated outer to read top