add new solution by using strlen