capitalized letters
moved common res part
debug print