use separate function for signal
fix manhattan stuff