refactor code - system.