[#88][#66][#76]Small function refactoring