handling the special cases correctly