solution 1&2