moar better logic