Edited my solution