Updated with bugs