adds more error handling and grabs instance explicitly