added more handling