might be dirty but works better then checking