Revert "code refactored"

This reverts commit ee970610c09c6dea13429a5d385ef1a9c30715ba.
refactoring