Added Error Handling