added drag handling for pendulums