cleanedup code via pullreview