#noissue refactoring code