partialize nasty logic