should be completed, needs more testing and debugging