[^] code refactored