better implementation of aspect switch