completed fuzzy peak logic