basic functionality added. need to work out bugs