improved like function