added reset / cleanup / and construct function