Removing dup code