hopefully fixed up to work ok now