improved snippet