library refactored

moving classes method so that no duplication of code remain