fixed buid with 2.4
refactoring