some modifications
add entity and user_entity