added init functionality