prepare to work like library