works for all basic cases