better inspect method, some cleanup