a little big refactoring