removed ending spaces, removed unnecessary operation