removed two useless if-statements