added cost library loading