Explaination with code