Input and waynes solution added