code refactoring & polishing
fixed bug when max props diff was not computed