removed duplicate function bodies