added moar logic