finished first draft of fixed point code