refactoring
using mine