still buggy
working except an exception