implemented gain