fixed inplane detection problem
changed function name to be more specific