first draft version with SDF support