Simple implementation of SFM