fixed code samples for 1.4 and 1.5