updated normal resolving
updated testing code for mac