end workflow implementation, adds basic security