removed casting as motorValue is already an int