make changes to use this as an addon