edited with bugs