simplified by using some instead of filter