solved 1.1 and 1.2
solved 1.3