working with most edge cases