implementing rebuild capabilities #31

Closes #31