Added first part of solution