modify from omega's comment