added remb0's suggestions