updated to allow better set up