initial implementation DONE... now to debug!