Working on solving edge case