implemented nicer parameters assignment