added SMD function