Extended api, added rebuild method