working now, but will need some fine tuning.