removed trailing whitespaces and added check for first string token is init