added a better inspect function