issue1 stuff refactored