updated with delete, ditribution, deinit
modified test app