main module and instance methods