modified, working now