added reconstruct functionality