clearing assests
improving and refactoring error handling