A man who broke into a Fife flat looking for cannabis was caught because of blood left behind when he smashed a window.
Kevin Brown, 30, of Raven Grove, Auchterarder, admitted that on August 21 he broke into a flat in Mid Street, Lochgelly, with intent to steal.
Neighbours had seen a person running away holding a black bag and police were able to analyse drops of blood found at the scene. The DNA profile led to Brown.
Sheriff Craig McSherry imposed a community payback order with 200 hours of unpaid work and a four-month restriction of liberty order.