Updated version without db