moved transition code to transition package