created function, made executable
final changes