need to debug and finished