removed dup code