Seems to be working but still needs to be fixed