debugging and model refinement
implemented model test