@emir-hasanbegovic started refactor for different library levels