added get density method