added improved membership functions and fuzzy logic