Code used for FLAIRS 2014 conference paper