fixing bugs, system working somewhoat