SINF0000 more or less what I want, needs some refinement