refactor with the help of resharper