local img added
feature separation bug fixed, but code should be refactored to FP style