Initial Implementation

minor fixes required