added cinit and corrected dealloc